package com.itboye.ihomebank.adapter;

import java.text.SimpleDateFormat;
import java.util.List;

import android.content.Context;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.bean.KaiSuoJiLu;
import com.itboye.ihomebank.support.commonadapter.MutiplyCommonAdapter;
import com.itboye.ihomebank.support.commonadapter.ViewHolder;
/**
 * 开锁记录
 *
 */
public class KaiSuoJiLuAdapter extends MutiplyCommonAdapter<KaiSuoJiLu.KaiSuoJiLuList>{
	int position;
	List<KaiSuoJiLu.KaiSuoJiLuList> datas;

	public KaiSuoJiLuAdapter(Context context, List<KaiSuoJiLu.KaiSuoJiLuList> datas,
			int... layoutId) {
		super(context, datas, layoutId);
		this.datas=datas;
	}

	@Override
	public int getItemViewType(int position) {
		return 0;
	}

	@Override
	public void getItemPosition(int position) {
		this.position=position;
		
	}

	@Override
	public void convert(ViewHolder holder, KaiSuoJiLu.KaiSuoJiLuList t, int type,
			int position) {
		
		holder.setText(R.id.jilu_phone, t.getNickname());
		holder.setText(R.id.jilu_name, t.getLockId());
		
		holder.setText(R.id.jilu_time, new SimpleDateFormat("yyyy-MM-dd HH:ss")
			.format(Long.parseLong(t.getUnlockDate()) * 1000));
		
	}

}
